home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_10_01 / 1001128a < prev    next >
Text File  |  1991-11-17  |  804b  |  39 lines

  1. #ifndef _REGIONDEF
  2. #define _REGIONDEF
  3. #include <stddef.h>
  4. #include <conio.h>
  5.  
  6. // This class saves and releases a region of the screen
  7. class region
  8.         {
  9. protected:
  10. // Screen coordinates
  11.         int left;
  12.         int top;
  13.         int right;
  14.         int bot;
  15. // Storage area
  16.         char *buf;
  17. public:
  18. // Methods:
  19.  
  20. // Constructor -- if save is 0, the screen region isn't saved.
  21. // You'd save it later with the reinit() method.
  22.         region(int x0,int y0,int x1,int y1,int save=1);
  23.  
  24. // Destructor
  25.         ~region();
  26.  
  27. // Force the region to reread its screen area and save it
  28.         void reinit(void);
  29.  
  30. // Restore screen data and destroy it
  31.         void restore(void);
  32.  
  33. // Destroy screen data with out restoring it
  34.         void destroy(void);
  35.         };
  36.  
  37. #endif
  38.  
  39.